package studio.ilocation.ex3mybatis.Service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import studio.ilocation.ex3mybatis.dao.FeatureLayerDao;
import studio.ilocation.ex3mybatis.entities.FeatureLayer;

@Service
public class FeaturelayerService {
    @Autowired
    // 声明接口矢量数据图层
    private FeatureLayerDao featLyrDao;

    // 获取全部要素服务
    public List<FeatureLayer> queryAllFeatLyrs(){

        return featLyrDao.selectAllFeatureLayers();
    }
    // 通过名字筛选获取全部要素服务
    public List<FeatureLayer> queryAllFeatLyrsByName(String name){
        
        return featLyrDao.selectAllFeatureLayersByName(name);
    }
    // 获取只包含名字和类型要素服务
    public List<FeatureLayer> selectOnlyNameAndTypeFeatureLayers(){

        return featLyrDao.selectOnlyNameAndTypeFeatureLayers();
    }
    // 通过名字获取只包含名字和类型要素服务
    public List<FeatureLayer> selectOnlyNameAndTypeFeatureLayersByName(String name){
        
        return featLyrDao.selectOnlyNameAndTypeFeatureLayersByName(name);
    }
    
}
